package CompositedPattern.demo;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author： pang-yun
 * @date： 2021-12-27 13:50
 * 功能目的 ：用于 抽象接口
 */
@Data
@AllArgsConstructor
public abstract class OrganizedComponent {
    public String name;
    public String desc;

    public void add(OrganizedComponent organizedComponent){
        throw new UnsupportedOperationException();
    }

    public void remove(OrganizedComponent organizedComponent){
        throw new UnsupportedOperationException();
    }


    //打印方法
    public abstract void print();
}
